@import url('https://fonts.googleapis.com/css2?family=Amatic+SC:wght@400;700&family=Onest:wght@300;500&display=swap');

:root {
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: inherit;
}

html {
    font-size: 16px;
    font-family: "Amatic SC", sans-serif;
    font-weight: 400;
    color: #fff;
}

body, html {
    margin: 0;
}

body {
    width: 100%;
    height: 100dvh;
    background: linear-gradient(145deg, #7908AA, #D2006B, #FFD700);
    overflow: hidden;
}

.background {
    position: relative;
    display: flex;
    justify-content: center;
    width: 100%;
    height: 100vh;
    overflow-y: auto;
}

.search-list {
    width: 35rem;
    transform: translateY(30vh);
    margin-bottom: 30vh;
}

.search-list__search-block {
    padding: .5rem;
    background-color: #fff;
    border-radius: .5rem;
}

.search-list__search-block input {
    width: 100%;
    line-height: 1.5;
    font-size: 2rem;
    border-radius: .5rem;
    border: 2px solid #e3e3e3;
    padding: .5rem;
}

.search-list__list-block ul {
    margin-top: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.search-list__list-block li {
    background-color: #fff;
    list-style-type: none;
    border-radius: .5rem;
    padding: 1rem;
    border: 1px solid #e3e3e3;
    color: #727272;
    font-size: 2rem;
    transition: transform .2s linear, margin-top .2s linear;
    transform: perspective(500px) rotateX(-20deg) scale(.95); 
    transform-origin: center bottom;
    margin-top: -.6rem;
}

.search-list__list-block li:first-child {
    margin-top: -.3rem;
}

.search-list__list-block li:nth-child(even) {
    transform: perspective(500px) rotateX(20deg) scale(.95); 
    margin-top: -.2rem;
    transform-origin: center top;
}

.list-result.close li {
    transform: perspective(500px) rotateX(-70deg) scale(.88);
    margin-top: -6.2rem;
}

.list-result.close li:first-child {
    margin-top: -3.1rem;
}

.list-result.close li:nth-child(even) {
    transform: perspective(500px) rotateX(70deg) scale(.88); 
    margin-top: -.2rem;
    transform-origin: center top;
}
